var express=require('express');//导入express(http框架)
var path=require('path');
var router = new express.Router();
router.post('/login',function (request,response) {
     console.log(request.body)
     var username = request.body.username;
     var password=request.body.password;
     if (username=='admin'&&password=='123456'){
         response.send({isSuccess:true});
     }else {
         response.send({isSuccess:false});
     }

})



router.get('/list',function (request,response) {
    console.log(request.query)
    var list=[{
        username:'admin',
        password:'123456'
    },{
        username:'test',
        password:'123456'
    }];
    response.send(list);
})

module.exports=router;
